@charset "UTF-8";

//
// @copyright        2017 opencart.cn - All Rights Reserved
// @link             http://www.guangdawangluo.com
// @author           Sam Chen <sam.chen@opencart.cn>
// @created          2017-09-25 15:34:25
// @modified         2017-12-19 12:28:35
//

.header-icon-bg {
  content: '';
  background-color: $brand-primary;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: 5px;
  width: 20px;
  height: 20px;
  z-index: -1;
}

nav#top {
  color: $page_top_color;
  height: $page_top_height;
  background: #fff;
  border-bottom: 1px solid #eee;

  .list-inline {
    > li {
      height: $page_top_height;
      line-height: $page_top_height;
    }
  }

  .btn-group, .list-inline li {
    &:hover {
      .dropdown-menu {
        display: block;
        visibility: visible;
        top: 100%;
      }
    }
  }


  a,button {
    color: $page_top_color;
    font-size: 12px;
    &:hover {
      color: $brand-secondary;
    }
  }

  .dropdown-menu {
    button, a {
      color: #333;
      text-align: left;
      padding: 8px 13px;
      &:hover {
        background-color: #eee;
        color: $brand-secondary;
      }
    }
  }

  .pull-left {
    margin-right: 10px;
    .btn-group {
      > button {
        height: $page_top_height;
        padding: 0;
      }
    }
  }
}


header {
  background: #fff;
  padding: $header_padding;

  h1 {
    margin: 0;
  }

  #search {
    width: 80%;
    border-radius: 20px;
    overflow: hidden;
    height: $header_button_height;
    line-height: $header_button_height;
    border: 1px solid #d4d4d4;

    input {
      border: none;
      padding-left: 24px;
    }

    button {
      position: absolute;
      right: 0;
      top: 0;
      z-index: 99;
      height: $header_button_height;
      padding: 0 17px;
      border-radius: 0;
      background: $brand-primary;
      border: transparent;

      i {
        font-size: 24px;
      }
    }
  }

  #logo {
    @media (max-width: 992px) {
      text-align: center;
    }
    img {
      display: inline-block;
      @media (min-width: 992px) {
        max-height: 42px;
      }
    }
  }

  #cart {
    float: right;
    .no-results {
      margin-bottom: 0;
      padding: 16px 6px;
    }

    &:hover {
      .dropdown-menu {
        display: block;
        visibility: visible;
        top: 100%;
      }
    }

    > button {
      padding: 0 8px;
      display: inherit;
      font-size: 14px;
      background: transparent;
      text-align: right;
      border: 1px solid #d4d4d4;
      border-radius: 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: $header_button_height;
      position: relative;

      span {
        padding: 0 4px;
        display: inline-block;
      }

      i {
        font-size: 20px;
        color: #000;
      }
    }

    .dropdown-menu {
      min-width: 350px;
      padding: 10px;

      li {
        border-bottom: none;

        .name {
          height: 33px;
          line-height: 16px;
          overflow: hidden;
          display: inline-block;
        }

        &.products {
          max-height: 400px;
          overflow: hidden;
          overflow-y: scroll;

          a {
            color: #333;
          }
        }
      }

      img {
        min-width: 50px;
        transition: none;
      }

      .btn-danger {
        background: #fff;
        color: #555;
        border-color: #eee;
      }
    }
  }

  .header-wishlist {
    float: right;
    border: 1px solid #d4d4d4;
    border-radius: 50%;
    text-align: center;
    position: relative;
    margin-left: 14px;
    @media (max-width: 1200px) {
      display: none;
    }
    &:after {
      @extend .header-icon-bg;
    }

    a {
      height: $header_button_height;
      width: $header_button_height;
      line-height: $header_button_height;
      display: block;
      color: #000;
      overflow: hidden;
      border-radius: 50%;
      &:hover {
        background: $brand-primary;
      }
      i {
        font-size: 20px;
      }
    }
  }
}
